package smedi.ismedi.web.bff.controller.qualityteam;


import com.smedi.ismedi.qualityteam.dto.request.subject.SubjectRecordRequest;
import com.smedi.ismedi.qualityteam.dto.response.subject.SubjectRecordResponse;
import com.smedi.ismedi.qualityteam.feign.RemoteSubjectRecordFeignApi;
import com.smedi.ismedi.web.starter.common.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import smedi.ismedi.web.bff.controller.BaseController;

/**
 * @Author nyl
 * @Date 2021/6/17 9:40
 */
@Api(tags = {"活动课题接口"})
@Slf4j
@RequestMapping(value = "/webbff/v1/subject")
@RestController
@RequiredArgsConstructor
public class SubjectRecordController extends BaseController {
    private final RemoteSubjectRecordFeignApi remoteSubjectRecordFeignApi;

    @ApiOperation(value = "活动课题记录 新增", nickname = "活动课题记录 新增")
    @PostMapping(value = "/add/record")
    public ResponseData<SubjectRecordResponse> addSubjectRecord(@Validated @RequestBody SubjectRecordRequest subjectRecordRequest) {

        return remoteSubjectRecordFeignApi.addSubjectRecord(subjectRecordRequest);
    }
}
